<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="add">
      <!-- v-text和innerText效果基本类似 -->
      <p v-text="msg"></p>
      <!-- v-html和innerHTML效果类似 -->
      <p v-html="msg"></p>
      <p>{{msg}}哦哈哈哈哈哈</p>
    </div>
    <script src="../vue.js"></script>
    <script>
      new Vue({
        el: "#add",
        data: {
          msg: "<h3>马杀鸡</h3>",
        },
      })
    </script>
  </body>
</html>
